import Vue from 'vue'
import Axios from 'axios';
import App from './App.vue'
import router from './router'
import store from './store'
// 引入两个ui组件
import Vant from 'vant';
import ElementUI from 'element-ui';

import less from 'less'

// import 'element-ui/lib/theme-chalk/index.css';
import 'vant/lib/index.css';

// Vue.use(ElementUI);
Vue.use(less)
Vue.use(Vant);
import './registerServiceWorker'

import 'normalize.css/normalize.css'
import '@/assets/css/base.css'
import Cookies from 'js-cookie'
import Element from 'element-ui'
// import './styles/element-variables.scss'
// 引入vant全部样式
import 'vant/lib/index.less';
Vue.config.productionTip = false

import md5 from 'js-md5'
import { getToken } from './utils/auth'
// Vue.prototype.$http = Axios
Vue.prototype.$md5 = password => {
  return md5(md5(password))
}

Vue.use(Element, {
  size: Cookies.get('size') || 'medium' // set element-ui default size
  // locale: enLang // 如果使用中文，无需设置，请删除
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

import { Message } from 'element-ui'